<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<div class="form-group">
								<label class="col-sm-3 control-label">图片：</label>
								<div class="col-sm-8">
									<input id="img" name="img" class="form-control" type="hidden" />

									<img width="155px" height="120px" id="img4"  />
									<button type="button" class="layui-btn" id="file">
										<i class="fa fa-cloud"></i>上传图片
									</button>

								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">用户：</label>
								<div class="col-sm-8">
									<input id="member" name="member" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">单价：</label>
								<div class="col-sm-8">
									<input id="price" name="price" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">总价：</label>
								<div class="col-sm-8">
									<input id="totalprice" name="totalprice" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">是否生效：</label>
								<div class="switch  col-sm-1">
									<div class="onoffswitch">
										<input id="stat" name="stat" checked="" type="checkbox"
											   value="1" class="onoffswitch-checkbox"> <label
											class="onoffswitch-label" for="stat"> <span
											class="onoffswitch-inner"></span> <span
											class="onoffswitch-switch"></span>
									</label>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">投放位置：</label>
								<div class="col-sm-8">
									<input id="location" name="location" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/cms/adv/add.js">
	</script>
	<script>
        layui.use('upload', function() {
            var upload = layui.upload;
            //执行实例
            var uploadInst = upload.render({
                elem : '#file', //绑定元素
                url : '/common/sysFile/upload', //上传接口
                size : 1000,
                accept : 'file',
                done : function(r) {
                    var fileName = r.url;
                    $("#img").val(fileName);
                },
                error : function(r) {
                    layer.msg(r.msg);
                }
            });
        });
	</script>
</body>
</html>
